/**
 * 标题
 * @author: tongsitong
 */

import styled from "styled-components";
import TitleIcon from "@/assets/icons/icon-table-title.png";

const Content = ({ className, style, children }) => (
  <div>
    <div className={className} style={style}>
      <span>{children}</span>
    </div>
  </div>
);

export const Title = styled(Content)`
  display: flex;
  > span {
    font-size: 20px;
    color: #35425e;
    line-height: 28px;
    font-weight: bold;

    &:before {
      content: " ";
      display: inline-block;
      position: relative;
      top: -2px;
      width: 18px;
      height: 19px;
      margin-right: 4px;
      vertical-align: middle;
      background-size: contain;
      background-image: url(${TitleIcon});
    }
  }
`;
